package com.link2room.quintesson.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by sss on 2017/4/6.
 */
@Entity
@Table(name = "taobao_xhotel")
@DynamicInsert
public class TaobaoXhotel extends BaseEntity{
    private String outerHid;
    private Long hid;
    private Long status;
    private Date taobaoCreatedTime;
    private Date taobaoModifiedTime;
    private String name;
    private String usedName;
    private Long matchStatus;
    private String matchInfo;
    private Integer domestic;
    private String country;
    private Long province;
    private Long city;
    private Long district;
    private String business;
    private String address;
    private String longitude;
    private String latitude;
    private String positionType;
    private String tel;
    private String extend;
    private String searchCode;
    private String isMatch;
    private String description;
    private String star;
    private String openingTime;
    private String decorateTime;
    private String floors;
    private Long rooms;
    private String hotelFacilities;
    private String service;
    private String roomFacilities;
    private String brand;
    private String postalCode;
    private String hotelPolicies;
    private String bookingNotice;
    private String creditCardTypes;



    @Basic
    @Column(name = "outer_hid", nullable = false, length = 32)
    public String getOuterHid() {
        return outerHid;
    }

    public void setOuterHid(String outerHid) {
        this.outerHid = outerHid;
    }

    @Basic
    @Column(name = "hid", nullable = true)
    public Long getHid() {
        return hid;
    }

    public void setHid(Long hid) {
        this.hid = hid;
    }

    @Basic
    @Column(name = "status", nullable = true)
    public Long getStatus() {
        return status;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    @Basic
    @Column(name = "taobao_created_time", nullable = true)
    public Date getTaobaoCreatedTime() {
        return taobaoCreatedTime;
    }

    public void setTaobaoCreatedTime(Date taobaoCreatedTime) {
        this.taobaoCreatedTime = taobaoCreatedTime;
    }

    @Basic
    @Column(name = "taobao_modified_time", nullable = true)
    public Date getTaobaoModifiedTime() {
        return taobaoModifiedTime;
    }

    public void setTaobaoModifiedTime(Date taobaoModifiedTime) {
        this.taobaoModifiedTime = taobaoModifiedTime;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 30)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "used_name", nullable = true, length = 30)
    public String getUsedName() {
        return usedName;
    }

    public void setUsedName(String usedName) {
        this.usedName = usedName;
    }

    @Basic
    @Column(name = "match_status", nullable = true)
    public Long getMatchStatus() {
        return matchStatus;
    }

    public void setMatchStatus(Long matchStatus) {
        this.matchStatus = matchStatus;
    }

    @Basic
    @Column(name = "match_info", nullable = true, length = 30)
    public String getMatchInfo() {
        return matchInfo;
    }

    public void setMatchInfo(String matchInfo) {
        this.matchInfo = matchInfo;
    }

    @Basic
    @Column(name = "domestic", nullable = true)
    public Integer getDomestic() {
        return domestic;
    }

    public void setDomestic(Integer domestic) {
        this.domestic = domestic;
    }

    @Basic
    @Column(name = "country", nullable = true, length = 10)
    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    @Basic
    @Column(name = "province", nullable = true)
    public Long getProvince() {
        return province;
    }

    public void setProvince(Long province) {
        this.province = province;
    }

    @Basic
    @Column(name = "city", nullable = true)
    public Long getCity() {
        return city;
    }

    public void setCity(Long city) {
        this.city = city;
    }

    @Basic
    @Column(name = "district", nullable = true)
    public Long getDistrict() {
        return district;
    }

    public void setDistrict(Long district) {
        this.district = district;
    }

    @Basic
    @Column(name = "business", nullable = true, length = 200)
    public String getBusiness() {
        return business;
    }

    public void setBusiness(String business) {
        this.business = business;
    }

    @Basic
    @Column(name = "address", nullable = true, length = 200)
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "longitude", nullable = true, length = 20)
    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    @Basic
    @Column(name = "latitude", nullable = true, length = 20)
    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    @Basic
    @Column(name = "position_type", nullable = true, length = 5)
    public String getPositionType() {
        return positionType;
    }

    public void setPositionType(String positionType) {
        this.positionType = positionType;
    }

    @Basic
    @Column(name = "tel", nullable = true, length = 40)
    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    @Basic
    @Column(name = "extend", nullable = true, length = 100)
    public String getExtend() {
        return extend;
    }

    public void setExtend(String extend) {
        this.extend = extend;
    }

    @Basic
    @Column(name = "search_code", nullable = true, length = 64)
    public String getSearchCode() {
        return searchCode;
    }

    public void setSearchCode(String searchCode) {
        this.searchCode = searchCode;
    }

    @Basic
    @Column(name = "is_match", nullable = true, length = 2)
    public String getIsMatch() {

        return isMatch;
    }

    public void setIsMatch(String isMatch) {
        this.isMatch = isMatch;
    }

    @Basic
    @Column(name = "description", nullable = true, length = -1)
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Basic
    @Column(name = "star", nullable = true, length = 8)
    public String getStar() {
        return star;
    }

    public void setStar(String star) {
        this.star = star;
    }

    @Basic
    @Column(name = "opening_time", nullable = true, length = 20)
    public String getOpeningTime() {
        return openingTime;
    }

    public void setOpeningTime(String openingTime) {
        this.openingTime = openingTime;
    }

    @Basic
    @Column(name = "decorate_time", nullable = true, length = 20)
    public String getDecorateTime() {
        return decorateTime;
    }

    public void setDecorateTime(String decorateTime) {
        this.decorateTime = decorateTime;
    }

    @Basic
    @Column(name = "floors", nullable = true, length = 32)
    public String getFloors() {
        return floors;
    }

    public void setFloors(String floors) {
        this.floors = floors;
    }

    @Basic
    @Column(name = "rooms", nullable = true)
    public Long getRooms() {
        return rooms;
    }

    public void setRooms(Long rooms) {
        this.rooms = rooms;
    }

    @Basic
    @Column(name = "hotel_facilities", nullable = true, length = 500)
    public String getHotelFacilities() {
        return hotelFacilities;
    }

    public void setHotelFacilities(String hotelFacilities) {
        this.hotelFacilities = hotelFacilities;
    }

    @Basic
    @Column(name = "service", nullable = true, length = 500)
    public String getService() {
        return service;
    }

    public void setService(String service) {
        this.service = service;
    }

    @Basic
    @Column(name = "room_facilities", nullable = true, length = 500)
    public String getRoomFacilities() {
        return roomFacilities;
    }

    public void setRoomFacilities(String roomFacilities) {
        this.roomFacilities = roomFacilities;
    }

    @Basic
    @Column(name = "brand", nullable = true, length = -1)
    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    @Basic
    @Column(name = "postal_code", nullable = true, length = 8)
    public String getPostalCode() {
        return postalCode;
    }

    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }

    @Basic
    @Column(name = "hotel_policies", nullable = true, length = 255)
    public String getHotelPolicies() {
        return hotelPolicies;
    }

    public void setHotelPolicies(String hotelPolicies) {
        this.hotelPolicies = hotelPolicies;
    }

    @Basic
    @Column(name = "booking_notice", nullable = true, length = 255)
    public String getBookingNotice() {
        return bookingNotice;
    }

    public void setBookingNotice(String bookingNotice) {
        this.bookingNotice = bookingNotice;
    }

    @Basic
    @Column(name = "credit_card_types", nullable = true, length = 255)
    public String getCreditCardTypes() {
        return creditCardTypes;
    }

    public void setCreditCardTypes(String creditCardTypes) {
        this.creditCardTypes = creditCardTypes;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TaobaoXhotel that = (TaobaoXhotel) o;

        if (outerHid != null ? !outerHid.equals(that.outerHid) : that.outerHid != null) return false;
        if (hid != null ? !hid.equals(that.hid) : that.hid != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (taobaoCreatedTime != null ? !taobaoCreatedTime.equals(that.taobaoCreatedTime) : that.taobaoCreatedTime != null)
            return false;
        if (taobaoModifiedTime != null ? !taobaoModifiedTime.equals(that.taobaoModifiedTime) : that.taobaoModifiedTime != null)
            return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (usedName != null ? !usedName.equals(that.usedName) : that.usedName != null) return false;
        if (matchStatus != null ? !matchStatus.equals(that.matchStatus) : that.matchStatus != null) return false;
        if (matchInfo != null ? !matchInfo.equals(that.matchInfo) : that.matchInfo != null) return false;
        if (domestic != null ? !domestic.equals(that.domestic) : that.domestic != null) return false;
        if (country != null ? !country.equals(that.country) : that.country != null) return false;
        if (province != null ? !province.equals(that.province) : that.province != null) return false;
        if (city != null ? !city.equals(that.city) : that.city != null) return false;
        if (district != null ? !district.equals(that.district) : that.district != null) return false;
        if (business != null ? !business.equals(that.business) : that.business != null) return false;
        if (address != null ? !address.equals(that.address) : that.address != null) return false;
        if (longitude != null ? !longitude.equals(that.longitude) : that.longitude != null) return false;
        if (latitude != null ? !latitude.equals(that.latitude) : that.latitude != null) return false;
        if (positionType != null ? !positionType.equals(that.positionType) : that.positionType != null) return false;
        if (tel != null ? !tel.equals(that.tel) : that.tel != null) return false;
        if (extend != null ? !extend.equals(that.extend) : that.extend != null) return false;
        if (searchCode != null ? !searchCode.equals(that.searchCode) : that.searchCode != null) return false;
        if (isMatch != null ? !isMatch.equals(that.isMatch) : that.isMatch != null) return false;
        if (description != null ? !description.equals(that.description) : that.description != null) return false;
        if (star != null ? !star.equals(that.star) : that.star != null) return false;
        if (openingTime != null ? !openingTime.equals(that.openingTime) : that.openingTime != null) return false;
        if (decorateTime != null ? !decorateTime.equals(that.decorateTime) : that.decorateTime != null) return false;
        if (floors != null ? !floors.equals(that.floors) : that.floors != null) return false;
        if (rooms != null ? !rooms.equals(that.rooms) : that.rooms != null) return false;
        if (hotelFacilities != null ? !hotelFacilities.equals(that.hotelFacilities) : that.hotelFacilities != null)
            return false;
        if (service != null ? !service.equals(that.service) : that.service != null) return false;
        if (roomFacilities != null ? !roomFacilities.equals(that.roomFacilities) : that.roomFacilities != null)
            return false;
        if (brand != null ? !brand.equals(that.brand) : that.brand != null) return false;
        if (postalCode != null ? !postalCode.equals(that.postalCode) : that.postalCode != null) return false;
        if (hotelPolicies != null ? !hotelPolicies.equals(that.hotelPolicies) : that.hotelPolicies != null)
            return false;
        if (bookingNotice != null ? !bookingNotice.equals(that.bookingNotice) : that.bookingNotice != null)
            return false;
        return creditCardTypes != null ? creditCardTypes.equals(that.creditCardTypes) : that.creditCardTypes == null;

    }

    @Override
    public int hashCode() {
        int result = outerHid != null ? outerHid.hashCode() : 0;
        result = 31 * result + (hid != null ? hid.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (taobaoCreatedTime != null ? taobaoCreatedTime.hashCode() : 0);
        result = 31 * result + (taobaoModifiedTime != null ? taobaoModifiedTime.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (usedName != null ? usedName.hashCode() : 0);
        result = 31 * result + (matchStatus != null ? matchStatus.hashCode() : 0);
        result = 31 * result + (matchInfo != null ? matchInfo.hashCode() : 0);
        result = 31 * result + (domestic != null ? domestic.hashCode() : 0);
        result = 31 * result + (country != null ? country.hashCode() : 0);
        result = 31 * result + (province != null ? province.hashCode() : 0);
        result = 31 * result + (city != null ? city.hashCode() : 0);
        result = 31 * result + (district != null ? district.hashCode() : 0);
        result = 31 * result + (business != null ? business.hashCode() : 0);
        result = 31 * result + (address != null ? address.hashCode() : 0);
        result = 31 * result + (longitude != null ? longitude.hashCode() : 0);
        result = 31 * result + (latitude != null ? latitude.hashCode() : 0);
        result = 31 * result + (positionType != null ? positionType.hashCode() : 0);
        result = 31 * result + (tel != null ? tel.hashCode() : 0);
        result = 31 * result + (extend != null ? extend.hashCode() : 0);
        result = 31 * result + (searchCode != null ? searchCode.hashCode() : 0);
        result = 31 * result + (isMatch != null ? isMatch.hashCode() : 0);
        result = 31 * result + (description != null ? description.hashCode() : 0);
        result = 31 * result + (star != null ? star.hashCode() : 0);
        result = 31 * result + (openingTime != null ? openingTime.hashCode() : 0);
        result = 31 * result + (decorateTime != null ? decorateTime.hashCode() : 0);
        result = 31 * result + (floors != null ? floors.hashCode() : 0);
        result = 31 * result + (rooms != null ? rooms.hashCode() : 0);
        result = 31 * result + (hotelFacilities != null ? hotelFacilities.hashCode() : 0);
        result = 31 * result + (service != null ? service.hashCode() : 0);
        result = 31 * result + (roomFacilities != null ? roomFacilities.hashCode() : 0);
        result = 31 * result + (brand != null ? brand.hashCode() : 0);
        result = 31 * result + (postalCode != null ? postalCode.hashCode() : 0);
        result = 31 * result + (hotelPolicies != null ? hotelPolicies.hashCode() : 0);
        result = 31 * result + (bookingNotice != null ? bookingNotice.hashCode() : 0);
        result = 31 * result + (creditCardTypes != null ? creditCardTypes.hashCode() : 0);
        return result;
    }
}
